package com.shujia.scala

//Demo6ScalaStudent(id: String, name: String, age: Int)  默认构造函数
class Demo6ScalaStudent(id: String, name: String, age: Int) {
  println("scala默认构造函数")

  //定义成员变量，定义就可以赋值
  val _id: String = id
  val _name: String = name
  val _age: Int = age


  //重写父类方法
  override def toString: String = s"${_id}\t${_name}\t${_age}"

  println("对象创建完成")

}
